package com.example.nativedom2test

import android.app.Activity

object Engine {
    var context: Activity? = null

    fun getScreenWidth(): Int {
        val res = context!!.resources
        return res.displayMetrics.widthPixels
    }

    private var mScale:Float = 0f
    fun getScale():Float{
        if(mScale <= 0) {
            mScale = context!!.resources.displayMetrics.density
        }
        return mScale
    }
}